<?php

use Phinx\Migration\AbstractMigration;

class AdddColumnIsDefaultInMenuRouteTable extends AbstractMigration
{
    public function up()
    {
        $this->table("menu_route")
            ->addColumn("is_default", "enum", [
                'values' => "yes,no",
                'default' => "no",
                'comment' => "是否默认",
                'null' => false,
            ])->save();
    }

    public function down()
    {
        $this->table("menu_route")
            ->removeColumn("is_default")
            ->save();

    }
}
